//package com.sping_boot3.spirng_boot3.config;
//
//import lombok.extern.slf4j.Slf4j;
//import org.apache.rocketmq.spring.annotation.MessageModel;
//import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
//import org.apache.rocketmq.spring.core.RocketMQListener;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Component;
//
//import java.time.LocalDateTime;
//import java.time.format.DateTimeFormatter;
//
//@Component
//@RocketMQMessageListener(topic = "first-two-topic",consumerGroup = "producer_group-01",messageModel = MessageModel.BROADCASTING)
//@Slf4j
//public class ConsumerTwo implements RocketMQListener<String> {
//    @Value("${server.port}")
//    private Integer port;
//    @Override
//    public void onMessage(String message) {
//        try {Thread.sleep(2000);} catch (InterruptedException e) {throw new RuntimeException(e);}
////        int a = 1/0;
//        System.out.println("端口："+port+":"+message.substring(0,1)+"号：开始就餐啦！！"+ LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME));
//    }
//}